<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xml:lang="en" lang="en">
	<h:head />
	<body>
		<ui:composition template="/rootWeb.xhtml">
	    <ui:define name="header">
	        <title>挤压排产单列表</title>
	        <script type="text/javascript">
				//页面载入时注册
	        	jQuery(document).ready(function(){
	        		//鼠标移入
					jQuery("#scheduleTable_data tr").live("mouseover", function() {
					  	jQuery(this).css("background-color","#CCCCCC");
					  	
					});
					//鼠标移出
					jQuery("#scheduleTable_data tr").live("mouseout", function() {
					  	jQuery(this).css("background-color","white");
					  	jQuery(this).css("color","black");
					});
				});
				
			</script>
			<style type="text/css">
				.datePickerInputStyle input {
				   width:80px;
				}
			</style>
		</ui:define>
	    <ui:define name="body">
	    	<h:form id="form" prependId="false">
	    		
				<p:dataTable id="scheduleTable" value="#{pressingScheduleTableAction.dailyPressingScheduleList}" var="scheduleMain" rowKey="#{scheduleMain}" 
						rowIndexVar="index" emptyMessage="没有记录！"  >
               			<p:column headerText="品名" style="width:60px">
               				<h:selectOneMenu value="#{scheduleEntry.orderDetail.mold.moldName}" disabled="true" >  
					                <f:selectItems value="#{pressingScheduleTableAction.moldNameItems}"/>
					            </h:selectOneMenu>
               			</p:column>
               			<p:column headerText="状态"  style="width:60px">
               				<h:selectOneMenu value="#{scheduleEntry.orderDetail.mold.moldState}" disabled="true">  
				                <f:selectItems value="#{pressingScheduleTableAction.moldStateItems}"/>
				            </h:selectOneMenu>
               			</p:column>
               			<p:column headerText="规格" style="width:60px">#{scheduleEntry.orderDetail.mold.moldSpecification}</p:column>
               			<p:column headerText="支数" style="text-align:right;width:80px;margin:0px">
               				<h:outputText value="#{scheduleEntry.orderDetail.detailQuantity}"  >
               					<f:convertNumber type="number" pattern="#,###.##"/>
               				</h:outputText>
               			</p:column>
               			<p:column headerText="重量" style="text-align:right;width:80px;margin:0px">
               				<h:outputText value="#{scheduleEntry.orderDetail.detailWeight}"  >
               					<f:convertNumber type="number" pattern="#,###.##" minFractionDigits="2"/>
               				</h:outputText>
               			</p:column>
               			<p:column headerText="完成数" style="text-align:right;width:80px;margin:0px">
               				<h:outputText value="#{scheduleEntry.finishedPressingQuantity}"  >
               					<f:convertNumber type="number" pattern="#,###.##"/>
               				</h:outputText>
               			</p:column>
               			<p:column headerText="完成重量" style="text-align:right;width:80px;margin:0px">
               				<h:outputText value="#{scheduleEntry.finishedPressingWeight}"  >
               					<f:convertNumber type="number" pattern="#,###.##" minFractionDigits="2"/>
               				</h:outputText>
               			</p:column>
               			<p:column headerText="剩余数" style="text-align:right;width:80px;margin:0px">
               				<h:outputText value="#{scheduleEntry.remainPressingQuantity}"  >
               					<f:convertNumber type="number" pattern="#,###.##"/>
               				</h:outputText>
               			</p:column>
               			<p:column headerText="剩余重量" style="text-align:right;width:80px;margin:0px">
               				<h:outputText value="#{scheduleEntry.remainPressingWeight}"  >
               					<f:convertNumber type="number" pattern="#,###.##" minFractionDigits="2"/>
               				</h:outputText>
               			</p:column>
               			<p:column headerText="机台" style="width:100px">
               				<p:inputText  value="#{scheduleEntry.machine.machineNumber}"  style="font-weight: bold;width:70px;"  readonly="true"/>
               				<p:commandLink value="选择" action="#{pressingScheduleTableAction.setSelectedScheduleTable(scheduleEntry)}" style="color:RED" 
               					update=":form:selectMachineDlgID" oncomplete="selectMachineDlg.show()"/>
               			</p:column>
               			<p:column headerText="班组" style="width:100px">
               				<p:inputText  value="#{scheduleEntry.team.teamName}"  style="font-weight: bold;width:70px;"  readonly="true"/>
               				<p:commandLink value="选择" action="#{pressingScheduleTableAction.setSelectedScheduleTable(scheduleEntry)}"  style="color:RED"
               					update=":form:selectTeamDlgID" oncomplete="selectTeamDlg.show()"/>
               			</p:column>
               			<p:column headerText="排产日期" style="width:50px">
               				<p:calendar value="#{scheduleEntry.scheduleDate}" size="8"  mindate="new Date();"  readonlyInput="true" styleClass="datePickerInputStyle"
    							timeZone="GMT+8" pattern="yy-MM-dd" showButtonPanel="true" navigator="true"/>
               			</p:column>
               			<p:column headerText="操作">
	               			<p:commandLink  value="查看"  style="color:RED"/>
               			</p:column>
               	</p:dataTable>
               	
			</h:form>
	    </ui:define>
		</ui:composition>
	</body>
</html>
